package cn.seocoo.platform.base.service.impl;

import java.util.List;

import cn.seocoo.platform.base.dto.BaseCommonDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.seocoo.platform.base.mapper.BaseOperationTypeMapper;
import cn.seocoo.platform.base.domain.BaseOperationType;
import cn.seocoo.platform.base.service.IBaseOperationTypeService;
import cn.seocoo.platform.common.core.text.Convert;

/**
 * 营运类型 服务层实现
 * 
 * @author wujian
 * @date 2019-12-30
 */
@Service
public class BaseOperationTypeServiceImpl implements IBaseOperationTypeService 
{
	@Autowired
	private BaseOperationTypeMapper baseOperationTypeMapper;

	/**
     * 查询营运类型信息
     * 
     * @param id 营运类型ID
     * @return 营运类型信息
     */
    @Override
	public BaseOperationType selectBaseOperationTypeById(Integer id)
	{
	    return baseOperationTypeMapper.selectBaseOperationTypeById(id);
	}
	
	/**
     * 查询营运类型列表
     * 
     * @param baseOperationType 营运类型信息
     * @return 营运类型集合
     */
	@Override
	public List<BaseOperationType> selectBaseOperationTypeList(BaseOperationType baseOperationType)
	{
	    return baseOperationTypeMapper.selectBaseOperationTypeList(baseOperationType);
	}
	
    /**
     * 新增营运类型
     * 
     * @param baseOperationType 营运类型信息
     * @return 结果
     */
	@Override
	public int insertBaseOperationType(BaseOperationType baseOperationType)
	{
	    return baseOperationTypeMapper.insertBaseOperationType(baseOperationType);
	}
	
	/**
     * 修改营运类型
     * 
     * @param baseOperationType 营运类型信息
     * @return 结果
     */
	@Override
	public int updateBaseOperationType(BaseOperationType baseOperationType)
	{
	    return baseOperationTypeMapper.updateBaseOperationType(baseOperationType);
	}

	/**
     * 删除营运类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBaseOperationTypeByIds(String ids)
	{
		return baseOperationTypeMapper.deleteBaseOperationTypeByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<BaseCommonDto> selectOperationType(String categoryName) {
		return baseOperationTypeMapper.selectOperationType(categoryName);
	}

}
